package controllers;

import javax.inject.Inject;

import models.User;
import services.UserService;

public class Security extends Secure.Security{
    
    @Inject
    private static UserService userService;
    
    public static boolean authenticate(String username, String password) {
        User user = userService.getUserByUsername(username);
        return user != null && user.getPassword().equals(password);
    }
}
